package com.woniu.task;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
public class taskTest {
/**
 * 开启定时任务
 * @Scheduled
 * @Configuration
 * 还有Application上的@EnableScheduling
 * cron表达式 百度*/
    @Scheduled(cron = "1/59 * * * * ?")
    public void sayLove(){
        System.out.println("I love you");
    }

}
